#include "TcpClient.h"
#include <iostream>
#include <atomic>
#include<chrono>
#include<thread>

extern "C"{
    #include <time.h>
}

using namespace std;

class Observer: public TcpClientLibevent::TcpClientObserver {
        void OnConnected() { 
            std::cout<<"connected";
        }
        virtual void OnDisConnected() { 
            
        }
        virtual void OnData(uint8_t *dat,uint64_t len){
            
        }
        virtual void OnClose(){

        }
};

int main(){
    Observer p ;
    TcpClientLibevent mTcp("127.0.0.1",8443, &p);
    while(true){
        std::this_thread::sleep_for(std::chrono::milliseconds(1000));
    }
}